# Makefile
# Qui fonctionne

PRG = module

# Fichiers dans l'ordre
ML = graph.ml module.ml 

CMO=${ML:.ml=.cmo}
CMX=${ML:.ml=.cmx}
CMI=${ML:.mli=.cmi}

OCAMLFLAGS = 
OCAMLLD = str.cmxa unix.cmxa -ccopt -L.
OCAMLOPT = ocamlopt.opt
OCAMLC = ocamlc.opt
OCAMLDEP = ocamldep

${PRG}: ${CMX}
	${OCAMLOPT} ${OCAMLFLAGS} ${OCAMLLD} -o $@ ${CMX}
	make clean

.SUFFIXES: .ml .mli .cmo .cmx .cmi

.ml.cmx: 
	${OCAMLOPT} ${OCAMLFLAGS} ${OCAMLLD} -c $<

.ml.cmo: 
	${OCAMLC} -c $<

.mli.cmi:${OCAMLC} -c $<

clean:
	rm -f *~ *.o *.cm? *mli

fullclean: clean
	rm -f .depend ${PRG}

depend: .depend
	.depend: ${ML} ${MLI}
	rm -f .depend
	${OCAMLDEP} ${ML} ${MLI} > .depend

include .depend
